package com.ericsson.enap.modules.topology.service.impl;

import com.ericsson.enap.modules.topology.entity.EpcCabVlanDict;
import com.ericsson.enap.modules.topology.mapper.EpcCabVlanDictMapper;
import com.ericsson.enap.modules.monitor.service.IEpcCabVlanDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * VLAN三级联动Service业务层处理
 *
 * @author wangjingshi
 * @date 2020-12-11
 */
@Service
public class EpcCabVlanDictServiceImpl implements IEpcCabVlanDictService
{
    @Autowired
    private EpcCabVlanDictMapper epcCabVlanDictMapper;

    /**
     * 查询VLAN三级联动
     *
     * @param id VLAN三级联动ID
     * @return VLAN三级联动
     */
    @Override
    public EpcCabVlanDict selectEpcCabVlanDictById(Integer id)
    {
        return epcCabVlanDictMapper.selectEpcCabVlanDictById(id);
    }

    /**
     * 查询VLAN三级联动列表
     *
     * @param epcCabVlanDict VLAN三级联动
     * @return VLAN三级联动
     */
    @Override
    public List<EpcCabVlanDict> selectEpcCabVlanDictList(EpcCabVlanDict epcCabVlanDict)
    {
        return epcCabVlanDictMapper.selectEpcCabVlanDictList(epcCabVlanDict);
    }

    /**
     * 新增VLAN三级联动
     *
     * @param epcCabVlanDict VLAN三级联动
     * @return 结果
     */
    @Override
    public int insertEpcCabVlanDict(EpcCabVlanDict epcCabVlanDict)
    {
        epcCabVlanDictMapper.insertEpcCabVlanDict(epcCabVlanDict);
        return epcCabVlanDict.getId();
    }

    /**
     * 修改VLAN三级联动
     *
     * @param epcCabVlanDict VLAN三级联动
     * @return 结果
     */
    @Override
    public int updateEpcCabVlanDict(EpcCabVlanDict epcCabVlanDict)
    {
        return epcCabVlanDictMapper.updateEpcCabVlanDict(epcCabVlanDict);
    }

    /**
     * 批量删除VLAN三级联动
     *
     * @param ids 需要删除的VLAN三级联动ID
     * @return 结果
     */
    @Override
    public int deleteEpcCabVlanDictByIds(Integer[] ids)
    {
        return epcCabVlanDictMapper.deleteEpcCabVlanDictByIds(ids);
    }

    /**
     * 删除VLAN三级联动信息
     *
     * @param id VLAN三级联动ID
     * @return 结果
     */
    @Override
    public int deleteEpcCabVlanDictById(Integer id)
    {
        return epcCabVlanDictMapper.deleteEpcCabVlanDictById(id);
    }
}
